package isjinhao.jlox.grammar.code.visitor;

import isjinhao.jlox.grammar.code.represention.*;

/**
 * @Author ISJINHAO
 * @Date 2021/2/26 20:58
 */
public interface CodeVisitor<R> {

    default R visit(Code code) {
        return code.accept(this);
    }

    default R visitIfCode(IfCode ifCode) {
        return null;
    }

    default R visitWhileCode(WhileCode whileCode) {
        return null;
    }

    default R visitForCode(ForCode forCode) {
        return null;
    }

    default R visitDoWhileCode(DoWhileCode doWhileCode) {
        return null;
    }

    default R visitStatementCode(StatementCode statementCode) {
        return null;
    }


    default R visitBlockStmt(Block block) {
        return null;
    }

}
